<template>
    <fieldset class="cc">
        <legend>插槽</legend>
        <h1>加载插槽内容</h1>
        <header>
            <slot name="header"></slot>
        </header>
        <main>
            <slot name="main"></slot>
        </main>
        <slot :row="obj" ></slot>
    </fieldset>
</template>

<style scoped>
    .cc ::v-slotted(.header){
    color: pink;
  }
</style>

<script>
    export default {
        data () {
            return {
                obj:{
                    imgSrc:"https://gimg2.baidu.com/image_search/src=http%3A%2F%2Fhimg.china.cn%2F0%2F5_324_1019271_750_516.jpg&refer=http%3A%2F%2Fhimg.china.cn&app=2002&size=f9999,10000&q=a80&n=0&g=0n&fmt=auto?sec=1662120242&t=c5a85aa222fa4d41aadbace60b79ce11"
                }
            }
        }
    }
</script>